package org.dding.msc.service;

import org.dding.msc.exception.StartException;

/**
 * The start lifecycle context.
 *
 */
public interface StartContext extends LifecycleContext {

    /**
     * Call when an <em>asynchronous</em> start lifecycle action has failed for some reason.
     *
     * @param reason the reason for the failure
     * @throws IllegalStateException if called before {@link #asynchronous()} is called, or if the action was already
     * completed
     */
    void failed(StartException reason) throws IllegalStateException;

}
